<template>
	<view class="content">
		<pyh-nv :config="config"></pyh-nv>
		<view class="success" v-if="success">
			<image :src="baseurl+'association/postSuccess.png'" class="postSuccess"></image>
			<text class="result">感谢您的分享</text>
			<text class="tips">您的帖子将于审核成功后发布</text>
			<view class="btn" @click="$back(2)">
				确定
			</view>
		</view>
		<view class="success" v-else>
			<image :src="baseurl+'association/postFail.png'" class="postFail"></image>
			<text class="result">发布失败</text>
			<text class="tips">{{msg}}</text>
			<view class="btn" @click="$back(1)">
				再次发布
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				baseurl: this.$baseurl,
				config: {
					title: '发布结果',
					bgColor: 'transparent',
					color: '#000',
				},
				success: true,
				msg: '很遗憾发布失败，再次发布试试！'
			}
		},
		onLoad(options) {
			this.msg = decodeURIComponent(decodeURIComponent(options.msg));
			if (options.id <= 0) {
				this.success = false;
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	.btn {
		width: 252rpx;
		height: 94rpx;
		line-height: 94rpx;
		text-align: center;
		background-color: #4E97AD;
		border-radius: 47rpx;
		color: #fff;
		margin: 0 auto;
		margin-top: 90rpx;
		font-size: 28rpx;
		font-weight: 500;
	}

	.tips {
		width: 100%;
		text-align: center;
		font-size: 24rpx;
		font-weight: 500;
		margin-top: 35rpx;
		color: #919191;
		display: block;
	}

	.result {
		width: 100%;
		text-align: center;
		font-size: 36rpx;
		font-weight: 700;
		margin-top: 70rpx;
		display: block;

	}

	.postFail {
		width: 152rpx;
		height: 152rpx;
		margin-left: 306rpx;
		margin-top: 414rpx;
	}

	.postSuccess {
		width: 88rpx;
		height: 108rpx;
		margin-left: 334rpx;
		margin-top: 414rpx;
	}

	.pyh-nv-box {
		position: absolute !important;
	}

	.content {
		width: 100%;
		height: 100vh;
		background: url('https://miantou.guguan.net/img/association/resultBg.jpg');
		background-size: 100% 100%;
	}
</style>